package com.world.cat.model.sys;

import com.world.common.generate.auto.*;
import com.world.common.model.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 角色
 */
@QClass(actions = {QClassAction.add, QClassAction.view, QClassAction.del, QClassAction.edit})
@Entity
@Table(name = "sys_role")
public class Role extends BaseEntity {
    @Column(name = "role_key", nullable = false)
    @QField(name = "角色代码")
    private String roleKey;

    @Column(name = "role_name", nullable = false)
    @QField(name = "角色名称", actions = {Action.show, Action.query, Action.edit}, queryType = QFieldQueryType.like, nullable = false)
    private String roleName;

    public String getRoleKey() {
        return roleKey;
    }

    public void setRoleKey(String roleKey) {
        this.roleKey = roleKey;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
}
